package com.ogawa.base.widget

import android.app.Dialog
import android.content.Context
import android.graphics.Color
import android.graphics.drawable.ColorDrawable
import android.view.Window
import com.ogawa.base.R
import kotlinx.android.synthetic.main.dialog_loading.*

class LoadingDialog : Dialog {

    constructor(context: Context) : super(context) {
        window?.addFlags(Window.FEATURE_NO_TITLE)
        window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
        setContentView(R.layout.dialog_loading)
    }
    constructor(context: Context, style:Int): super(context, style){
        window?.addFlags(Window.FEATURE_NO_TITLE)
        window?.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
        setContentView(R.layout.dialog_loading)
    }

    fun setMsg(msg: String) {
        tv_msg.text = msg
    }
}